//////////////////////////////////////////////////////////////////////////
public:
	/// <summary>
	/// CV_IS_IMAGE_HDR
	/// </summary>
	static bool IS_IMAGE_HDR(NativeHandleObject^ img)
	{
		void* ptr = img->ToNativePointer();
		return CV_IS_IMAGE_HDR(ptr);
	}

	/// <summary>
	/// CV_IS_IMAGE
	/// </summary>
	static bool IS_IMAGE(NativeHandleObject^ img)
	{
		void* ptr = img->ToNativePointer();
		return CV_IS_IMAGE(ptr);
	}

	/// <summary>
	/// get reference to pixel at (col,row),
	/// for multi-channel images (col) should be multiplied by number of channels
	/// </summary>
	/// <typeparam name="TElemType"></typeparam>
	/// <param name="image"></param>
	/// <param name="row"></param>
	/// <param name="col"></param>
	/// <returns></returns>
	generic<typename TPixel> where TPixel : value struct
	static TPixel IMAGE_ELEM(ManagedImage^ image, int row, int col)
	{
		IplImage* pimage = image->ToIplImagePointer();
		TPixel pixel;
		Marshal::PtrToStructure(IntPtr(((pimage)->imageData + (pimage)->widthStep*(row))+ col * sizeof(TPixel)), pixel);
		return pixel;
	}

	/// <summary>
	/// CV_MAT_DEPTH
	/// </summary>
	static MatDepth MAT_DEPTH(MatFlag flags)
	{
		return (MatDepth)CV_MAT_DEPTH((int)flags);
	}
	/// <summary>
	/// CV_MAKETYPE
	/// </summary>
	static MatFlag MAKETYPE(MatDepth depth, int cn)
	{
		return (MatFlag)CV_MAKE_TYPE((int)depth, cn);
	}
	/// <summary>
	/// CV_MAKE_TYPE
	/// </summary>
	static MatFlag MAKE_TYPE(MatDepth depth, int cn)
	{
		return (MatFlag)CV_MAKE_TYPE((int)depth, cn);
	}
	/// <summary>
	/// CV_8UC
	/// </summary>
	static MatFlag MAKE_TYPE_8UC(int n) { return (MatFlag)CV_8UC(n); }
	/// <summary>
	/// CV_8SC
	/// </summary>
	static MatFlag MAKE_TYPE_8SC(int n) { return (MatFlag)CV_8SC(n); }
	/// <summary>
	/// CV_16UC
	/// </summary>
	static MatFlag MAKE_TYPE_16UC(int n) { return (MatFlag)CV_16UC(n); }
	/// <summary>
	/// CV_16SC
	/// </summary>
	static MatFlag MAKE_TYPE_16SC(int n) { return (MatFlag)CV_16SC(n); }
	/// <summary>
	/// CV_32SC
	/// </summary>
	static MatFlag MAKE_TYPE_32SC(int n) { return (MatFlag)CV_32SC(n); }
	/// <summary>
	/// CV_32FC
	/// </summary>
	static MatFlag MAKE_TYPE_32FC(int n) { return (MatFlag)CV_32FC(n); }
	/// <summary>
	/// CV_64FC
	/// </summary>
	static MatFlag MAKE_TYPE_64FC(int n) { return (MatFlag)CV_64FC(n); }
	/// <summary>
	/// CV_MAT_CN
	/// </summary>
	static int MAT_CN(MatFlag flags)
	{
		return (int)CV_MAT_CN((int)flags);
	}
	/// <summary>
	/// CV_MAT_TYPE
	/// </summary>
	static MatFlag MAT_TYPE(MatFlag flags)
	{
		return (MatFlag)CV_MAT_TYPE((int)flags);
	}
	/// <summary>
	/// CV_IS_MAT_CONT
	/// </summary>
	static bool IS_MAT_CONT(MatFlag flags)
	{
		return CV_IS_MAT_CONT((int)flags) != 0;
	}
	/// <summary>
	/// CV_IS_CONT_MAT
	/// </summary>
	static bool IS_CONT_MAT(MatFlag flags)
	{
		return CV_IS_CONT_MAT((int)flags) != 0;
	}
	/// <summary>
	/// CV_IS_TEMP_MAT
	/// </summary>
	static bool IS_TEMP_MAT(MatFlag flags)
	{
		return CV_IS_TEMP_MAT((int)flags) != 0;
	}
	/// <summary>
	/// CV_IS_MAT_HDR
	/// </summary>
	static bool IS_MAT_HDR(NativeHandleObject^ mat)
	{
		void* ptr = mat->ToNativePointer();
		return CV_IS_MAT_HDR(ptr);
	}
	/// <summary>
	/// CV_IS_MAT
	/// </summary>
	static bool IS_MAT(NativeHandleObject^ mat)
	{
		void* ptr = mat->ToNativePointer();
		return CV_IS_MAT(ptr);
	}
	/// <summary>
	/// CV_IS_MASK_ARR
	/// </summary>
	static bool IS_MASK_ARR(ManagedMat^ mat)
	{
		CvMat* ptr = mat->ToCvMatPointer();
		return CV_IS_MASK_ARR(ptr);
	}
	/// <summary>
	/// CV_ARE_TYPES_EQ
	/// </summary>
	static bool ARE_TYPES_EQ(ManagedMat^ mat1, ManagedMat^ mat2)
	{
		CvMat* ptr1 = mat1->ToCvMatPointer();
		CvMat* ptr2 = mat2->ToCvMatPointer();
		return CV_ARE_TYPES_EQ(ptr1, ptr2);
	}
	/// <summary>
	/// CV_ARE_CNS_EQ
	/// </summary>
	static bool ARE_CNS_EQ(ManagedMat^ mat1, ManagedMat^ mat2)
	{
		CvMat* ptr1 = mat1->ToCvMatPointer();
		CvMat* ptr2 = mat2->ToCvMatPointer();
		return CV_ARE_CNS_EQ(ptr1, ptr2);
	}
	/// <summary>
	/// CV_ARE_DEPTHS_EQ
	/// </summary>
	static bool ARE_DEPTHS_EQ(ManagedMat^ mat1, ManagedMat^ mat2)
	{
		CvMat* ptr1 = mat1->ToCvMatPointer();
		CvMat* ptr2 = mat2->ToCvMatPointer();
		return CV_ARE_DEPTHS_EQ(ptr1, ptr2);
	}
	/// <summary>
	/// CV_ARE_SIZES_EQ
	/// </summary>
	static bool ARE_SIZES_EQ(ManagedMat^ mat1, ManagedMat^ mat2)
	{
		CvMat* ptr1 = mat1->ToCvMatPointer();
		CvMat* ptr2 = mat2->ToCvMatPointer();
		return CV_ARE_SIZES_EQ(ptr1, ptr2);
	}
	/// <summary>
	/// CV_IS_MAT_CONST
	/// </summary>
	static bool IS_MAT_CONST(ManagedMat^ mat)
	{
		CvMat* ptr = mat->ToCvMatPointer();
		return CV_IS_MAT_CONST(ptr);
	}
	/// <summary>
	/// Size of each channel item,
	/// 0x124489 = 1000 0100 0100 0010 0010 0001 0001 ~ array of sizeof(arr_type_elem)
	/// </summary>
	static int ELEM_SIZE1(MatFlag type)
	{
		return CV_ELEM_SIZE1((int)type);
	}
	/// <summary>
	/// 0x3a50 = 11 10 10 01 01 00 00 ~ array of log2(sizeof(arr_type_elem))
	/// </summary>
	static int ELEM_SIZE(MatFlag type)
	{
		return CV_ELEM_SIZE((int)type);
	}
	/// <summary>
	/// CV_MAT_ELEM_PTR_FAST
	/// </summary>
	/// <param name="mat"></param>
	/// <param name="row"></param>
	/// <param name="col"></param>
	/// <param name="pix_size"></param>
	/// <returns></returns>
	static IntPtr MAT_ELEM_PTR_FAST(ManagedMat^ mat, int row, int col, int pix_size)
	{
		CvMat& ptr = *mat->ToCvMatPointer();
		return IntPtr(CV_MAT_ELEM_PTR_FAST(ptr, row, col, pix_size));
	}
	/// <summary>
	/// CV_MAT_ELEM_PTR
	/// </summary>
	/// <param name="mat"></param>
	/// <param name="row"></param>
	/// <param name="col"></param>
	/// <returns></returns>
	static IntPtr MAT_ELEM_PTR(ManagedMat^ mat, int row, int col)
	{
		CvMat& ptr = *mat->ToCvMatPointer();
		return IntPtr(CV_MAT_ELEM_PTR(ptr, row, col));
	}
	/// <summary>
	/// CV_MAT_ELEM
	/// </summary>
	/// <typeparam name="TElem"></typeparam>
	/// <param name="mat"></param>
	/// <param name="row"></param>
	/// <param name="col"></param>
	/// <returns></returns>
	generic<typename TElem> where TElem : value struct
	static TElem MAT_ELEM(ManagedMat^ mat, int row, int col)
	{
		TElem tRet;
		Marshal::PtrToStructure(MAT_ELEM_PTR_FAST(mat, row, col, sizeof(TElem)), tRet);
		return tRet;
	}

	/// <summary>
	/// CV_IS_MATND_HDR
	/// </summary>
	static bool IS_MATND_HDR(NativeHandleObject^ mat)
	{
		void* ptr = mat->ToNativePointer();
		return CV_IS_MATND_HDR(ptr);
	}
	/// <summary>
	/// CV_IS_MATND
	/// </summary>
	static bool IS_MATND(NativeHandleObject^ mat)
	{
		void* ptr = mat->ToNativePointer();
		return CV_IS_MATND(ptr);
	}

	/// <summary>
	/// CV_IS_SPARSE_MAT_HDR
	/// </summary>
	static bool IS_SPARSE_MAT_HDR(NativeHandleObject^ mat)
	{
		void* ptr = mat->ToNativePointer();
		return CV_IS_SPARSE_MAT_HDR(ptr);
	}
	/// <summary>
	/// CV_IS_SPARSE_MAT
	/// </summary>
	static bool IS_SPARSE_MAT(NativeHandleObject^ mat)
	{
		void* ptr = mat->ToNativePointer();
		return CV_IS_SPARSE_MAT(ptr);
	}

	/// <summary>
	/// CV_NODE_VAL
	/// </summary>
	/// <param name="mat"></param>
	/// <param name="node"></param>
	/// <returns></returns>
	static IntPtr NODE_VAL(ManagedSparseMat^ mat, ManagedSparseNode^ node)
	{
		CvSparseMat* matPtr = mat->ToCvSparseMatPointer();
		CvSparseNode* nodePtr = node->ToCvSparseNodePointer();
		return IntPtr(CV_NODE_VAL(matPtr, nodePtr));
	}
	/// <summary>
	/// CV_NODE_IDX
	/// </summary>
	/// <param name="mat"></param>
	/// <param name="node"></param>
	/// <returns></returns>
	static IntPtr NODE_IDX(ManagedSparseMat^ mat, ManagedSparseNode^ node)
	{
		CvSparseMat* matPtr = mat->ToCvSparseMatPointer();
		CvSparseNode* nodePtr = node->ToCvSparseNodePointer();
		return IntPtr(CV_NODE_IDX(matPtr, nodePtr));
	}

	/// <summary>
	/// </summary>
	static bool IS_HIST(NativeHandleObject^ hist)
	{
		CvHistogram* ptr = (CvHistogram*)hist->ToNativePointer();
		return CV_IS_HIST(ptr);
	}
	/// <summary>
	/// CV_IS_UNIFORM_HIST
	/// </summary>
	static bool IS_UNIFORM_HIST(ManagedHistogram^ hist)
	{
		CvHistogram* ptr = hist->ToCvHistogramPointer();
		return CV_IS_UNIFORM_HIST(ptr);
	}
	/// <summary>
	/// CV_IS_SPARSE_HIST
	/// </summary>
	static bool IS_SPARSE_HIST(ManagedHistogram^ hist)
	{
		CvHistogram* ptr = hist->ToCvHistogramPointer();
		return CV_IS_SPARSE_HIST(ptr);
	}
	/// <summary>
	/// CV_HIST_HAS_RANGES
	/// </summary>
	static bool HIST_HAS_RANGES(ManagedHistogram^ hist)
	{
		CvHistogram* ptr = hist->ToCvHistogramPointer();
		return CV_HIST_HAS_RANGES(ptr);
	}
	/// <summary>
	/// </summary>
	static bool IS_STORAGE(NativeHandleObject^ storage)
	{
		void* ptr = storage->ToNativePointer();
		return CV_IS_STORAGE(ptr);
	}
	/// <summary>
	/// Checks whether the element pointed by ptr belongs to a set or not
	/// </summary>
	static bool IS_SET_ELEM(NativeHandleObject^ ptr)
	{
		void* p = ptr->ToNativePointer();
		return CV_IS_SET_ELEM(p);
	}
	/// <summary>
	/// CV_IS_SEQ
	/// </summary>
	static bool IS_SEQ(NativeHandleObject^ seq)
	{
		void* ptr = seq->ToNativePointer();
		return CV_IS_SEQ(ptr);
	}
	/// <summary>
	/// CV_IS_SET
	/// </summary>
	static bool IS_SET(NativeHandleObject^ seq)
	{
		void* ptr = seq->ToNativePointer();
		return CV_IS_SET(ptr);
	}
	/// <summary>
	/// CV_SEQ_ELTYPE
	/// </summary>
	static SeqFlag SEQ_ELTYPE(NativeHandleObject^ seq)
	{
		CvSeq* ptr = (CvSeq*)seq->ToNativePointer();
		return (SeqFlag)CV_SEQ_ELTYPE(ptr);
	}
	/// <summary>
	/// CV_SEQ_KIND
	/// </summary>
	static SeqFlag SEQ_KIND(NativeHandleObject^ seq)
	{
		CvSeq* ptr = (CvSeq*)seq->ToNativePointer();
		return (SeqFlag)CV_SEQ_KIND(ptr);
	}
	/// <summary>
	/// CV_IS_SEQ_INDEX
	/// </summary>
	static bool IS_SEQ_INDEX(NativeHandleObject^ seq)
	{
		CvSeq* ptr = (CvSeq*)seq->ToNativePointer();
		return CV_IS_SEQ_INDEX(ptr);
	}
	/// <summary>
	/// CV_IS_SEQ_CURVE
	/// </summary>
	static bool IS_SEQ_CURVE(NativeHandleObject^ seq)
	{
		CvSeq* ptr = (CvSeq*)seq->ToNativePointer();
		return CV_IS_SEQ_CURVE(ptr);
	}
	/// <summary>
	/// CV_IS_SEQ_CLOSED
	/// </summary>
	static bool IS_SEQ_CLOSED(NativeHandleObject^ seq)
	{
		CvSeq* ptr = (CvSeq*)seq->ToNativePointer();
		return CV_IS_SEQ_CLOSED(ptr);
	}
	/// <summary>
	/// CV_IS_SEQ_CONVEX
	/// </summary>
	static bool IS_SEQ_CONVEX(NativeHandleObject^ seq)
	{
		CvSeq* ptr = (CvSeq*)seq->ToNativePointer();
		return CV_IS_SEQ_CONVEX(ptr);
	}
	/// <summary>
	/// CV_IS_SEQ_HOLE
	/// </summary>
	static bool IS_SEQ_HOLE(NativeHandleObject^ seq)
	{
		CvSeq* ptr = (CvSeq*)seq->ToNativePointer();
		return CV_IS_SEQ_HOLE(ptr);
	}
	/// <summary>
	/// CV_IS_SEQ_SIMPLE
	/// </summary>
	static bool IS_SEQ_SIMPLE(NativeHandleObject^ seq)
	{
		CvSeq* ptr = (CvSeq*)seq->ToNativePointer();
		return CV_IS_SEQ_SIMPLE(ptr);
	}
	/// <summary>
	/// CV_IS_SEQ_POINT_SET
	/// </summary>
	static bool IS_SEQ_POINT_SET(NativeHandleObject^ seq)
	{
		CvSeq* ptr = (CvSeq*)seq->ToNativePointer();
		return CV_IS_SEQ_POINT_SET(ptr);
	}
	/// <summary>
	/// CV_IS_SEQ_POINT_SUBSET
	/// </summary>
	static bool IS_SEQ_POINT_SUBSET(NativeHandleObject^ seq)
	{
		CvSeq* ptr = (CvSeq*)seq->ToNativePointer();
		return CV_IS_SEQ_POINT_SUBSET(ptr);
	}
	/// <summary>
	/// CV_IS_SEQ_POLYLINE
	/// </summary>
	static bool IS_SEQ_POLYLINE(NativeHandleObject^ seq)
	{
		CvSeq* ptr = (CvSeq*)seq->ToNativePointer();
		return CV_IS_SEQ_POLYLINE(ptr);
	}
	/// <summary>
	/// CV_IS_SEQ_POLYGON
	/// </summary>
	static bool IS_SEQ_POLYGON(NativeHandleObject^ seq)
	{
		CvSeq* ptr = (CvSeq*)seq->ToNativePointer();
		return CV_IS_SEQ_POLYGON(ptr);
	}
	/// <summary>
	/// CV_IS_SEQ_CHAIN
	/// </summary>
	static bool IS_SEQ_CHAIN(NativeHandleObject^ seq)
	{
		CvSeq* ptr = (CvSeq*)seq->ToNativePointer();
		return CV_IS_SEQ_CHAIN(ptr);
	}
	/// <summary>
	/// CV_IS_SEQ_CONTOUR
	/// </summary>
	static bool IS_SEQ_CONTOUR(NativeHandleObject^ seq)
	{
		CvSeq* ptr = (CvSeq*)seq->ToNativePointer();
		return CV_IS_SEQ_CONTOUR(ptr);
	}
	/// <summary>
	/// CV_IS_SEQ_CHAIN_CONTOUR
	/// </summary>
	static bool IS_SEQ_CHAIN_CONTOUR(NativeHandleObject^ seq)
	{
		CvSeq* ptr = (CvSeq*)seq->ToNativePointer();
		return CV_IS_SEQ_CHAIN_CONTOUR(ptr);
	}
	/// <summary>
	/// CV_IS_SEQ_POLYGON_TREE
	/// </summary>
	static bool IS_SEQ_POLYGON_TREE(NativeHandleObject^ seq)
	{
		CvSeq* ptr = (CvSeq*)seq->ToNativePointer();
		return CV_IS_SEQ_POLYGON_TREE(ptr);
	}
	/// <summary>
	/// CV_IS_GRAPH
	/// </summary>
	static bool IS_GRAPH(NativeHandleObject^ seq)
	{
		void* ptr = seq->ToNativePointer();
		return CV_IS_GRAPH(ptr);
	}
	/// <summary>
	/// CV_IS_GRAPH_ORIENTED
	/// </summary>
	static bool IS_GRAPH_ORIENTED(ManagedGraph^ seq)
	{
		CvGraph* ptr = seq->ToCvGraphPointer();
		return CV_IS_GRAPH_ORIENTED(ptr);
	}
	/// <summary>
	/// CV_IS_SUBDIV2D
	/// </summary>
	static bool IS_SUBDIV2D(NativeHandleObject^ seq)
	{
		void* ptr = seq->ToNativePointer();
		return CV_IS_SUBDIV2D(ptr);
	}
	/// <summary>
	/// CV_SEQ_ELEM
	/// </summary>
	/// <typeparam name="TElemType"></typeparam>
	/// <param name="seq"></param>
	/// <param name="index"></param>
	/// <returns></returns>
	static IntPtr SEQ_ELEM(ManagedSeq^ seq, int index)
	{
		CvSeq* ptr = seq->ToCvSeqPointer();
		return IntPtr(cvGetSeqElem(ptr, index));
	}
	/// <summary>
	/// CV_GET_SEQ_ELEM
	/// </summary>
	/// <typeparam name="TElemType"></typeparam>
	/// <param name="seq"></param>
	/// <param name="index"></param>
	/// <returns></returns>
	static IntPtr GET_SEQ_ELEM(ManagedSeq^ seq, int index)
	{
		CvSeq* ptr = seq->ToCvSeqPointer();
		return IntPtr(cvGetSeqElem(ptr, index));
	}

	/// <summary>
	/// Add element to sequence
	/// </summary>
	/// <param name="elem_ptr"></param>
	/// <param name="writer"></param>
	generic<typename TElem> where TElem : value struct
	static void WRITE_SEQ_ELEM_VAR(TElem% elem, ManagedSeqWriter^ writer)
	{
		CvSeqWriter& writerRef = *writer->ToCvSeqWriterPointer();
		pin_ptr<void> elem_ptr = &elem;
		CV_WRITE_SEQ_ELEM_VAR(elem_ptr, writerRef);
	}

	/// <summary>
	/// CV_WRITE_SEQ_ELEM
	/// </summary>
	/// <param name="elem"></param>
	/// <param name="writer"></param>
	generic<typename TElem> where TElem : value struct
	static void WRITE_SEQ_ELEM(TElem elem, ManagedSeqWriter^ writer)
	{
		CvSeqWriter& writerRef = *writer->ToCvSeqWriterPointer();
		CV_WRITE_SEQ_ELEM(elem, writerRef);                 
	}

	/// <summary>
	/// Move reader position forward
	/// </summary>
	/// <param name="elem_size"></param>
	/// <param name="reader"></param>
	static void NEXT_SEQ_ELEM(int elem_size, ManagedSeqReader^ reader)
	{
		CvSeqReader& readerRef = *reader->ToCvSeqReaderPointer();
		CV_NEXT_SEQ_ELEM(elem_size, readerRef);
	}

	/// <summary>
	/// Move reader position backward
	/// </summary>
	/// <param name="elem_size"></param>
	/// <param name="reader"></param>
	static void PREV_SEQ_ELEM(int elem_size, ManagedSeqReader^ reader)
	{
		CvSeqReader& readerRef = *reader->ToCvSeqReaderPointer();
		CV_PREV_SEQ_ELEM(elem_size, readerRef);
	}

	/// <summary>
	/// Read element and move read position forward
	/// </summary>
	/// <param name="elem"></param>
	/// <param name="reader"></param>
	generic<typename TElem> where TElem : value struct
	static void READ_SEQ_ELEM(TElem% elem, ManagedSeqReader^ reader)
	{
		TElem tElem;
		CvSeqReader& readerRef = *reader->ToCvSeqReaderPointer();
		CV_READ_SEQ_ELEM(tElem, readerRef);
		elem = tElem;
	}

	/// <summary>
	/// Read element and move read position backward
	/// </summary>
	/// <param name="elem"></param>
	/// <param name="reader"></param>
	generic<typename TElem> where TElem : value struct
	static void REV_READ_SEQ_ELEM(TElem% elem, ManagedSeqReader^ reader)
	{
		TElem tElem;
		CvSeqReader& readerRef = *reader->ToCvSeqReaderPointer();
		CV_REV_READ_SEQ_ELEM(tElem, readerRef);
		elem = tElem;
	}

	///// <summary>
	///// CV_READ_CHAIN_POINT
	///// </summary>
	///// <param name="_pt"></param>
	///// <param name="reader"></param>
	//static void READ_CHAIN_POINT(Point2D32s& _pt, ManagedSeqReader^ reader)
	//{
	//    // Bug in openCV !!!
	//	CvSeqReader& readerRef = *reader->ToCvSeqReaderPointer();
	//	CvPoint pt;
	//	CV_READ_CHAIN_POINT(pt, readerRef);
	//	_pt.X = pt.x;
	//	_pt.Y = pt.y;
	//}

	/// <summary>
	/// CV_CURRENT_POINT
	/// </summary>
	/// <param name="reader"></param>
	/// <returns></returns>
	static Point2D32s CURRENT_POINT(ManagedSeqReader^ reader)
	{
		CvSeqReader& readerRef = *reader->ToCvSeqReaderPointer();
		CvPoint pt = CV_CURRENT_POINT(readerRef);
		return Point2D32s(pt.x, pt.y);
	}
	/// <summary>
	/// CV_PREV_POINT
	/// </summary>
	/// <param name="reader"></param>
	/// <returns></returns>
	static Point2D32s PREV_POINT(ManagedSeqReader^ reader)
	{
		CvSeqReader& readerRef = *reader->ToCvSeqReaderPointer();
		CvPoint pt = CV_PREV_POINT(readerRef);
		return Point2D32s(pt.x, pt.y);
	}
	/// <summary>
	/// CV_READ_EDGE
	/// </summary>
	/// <param name="pt1"></param>
	/// <param name="pt2"></param>
	/// <param name="reader"></param>
	static void READ_EDGE(Point2D32s& pt1, Point2D32s& pt2, ManagedSeqReader^ reader)
	{
		CvSeqReader& readerRef = *reader->ToCvSeqReaderPointer();
		CvPoint cvpt1, cvpt2;
		CV_READ_EDGE(cvpt1, cvpt2, readerRef);
		pt1.X = cvpt1.x;
		pt1.Y = cvpt1.y;
		pt2.X = cvpt2.x;
		pt2.Y = cvpt2.y;
	}
	/// <summary>
	/// Return next graph edge for given vertex
	/// </summary>
	/// <param name="edge"></param>
	/// <param name="vertex"></param>
	static void NEXT_GRAPH_EDGE(ManagedGraphEdge^ edge, ManagedGraphVtx^ vertex)
	{
		CvGraphEdge* edgePtr = edge->ToCvGraphEdgePointer();
		CvGraphVtx* vertexPtr = vertex->ToCvGraphVtxPointer();
		CV_NEXT_GRAPH_EDGE(edgePtr, vertexPtr);
	}

	/// <summary>
	/// CV_NODE_TYPE
	/// </summary>
	static FileNodeFlag NODE_TYPE(FileNodeFlag flags)
	{
		return (FileNodeFlag)CV_NODE_TYPE((int)flags);
	}

	/// <summary>
	/// CV_NODE_IS_INT
	/// </summary>
	static bool NODE_IS_INT(FileNodeFlag flags)
	{
		return CV_NODE_IS_INT((int)flags);
	}

	/// <summary>
	/// CV_NODE_IS_REAL
	/// </summary>
	static bool NODE_IS_REAL(FileNodeFlag flags)
	{
		return CV_NODE_IS_REAL((int)flags);
	}

	/// <summary>
	/// CV_NODE_IS_STRING
	/// </summary>
	static bool NODE_IS_STRING(FileNodeFlag flags)
	{
		return CV_NODE_IS_STRING((int)flags);
	}

	/// <summary>
	/// CV_NODE_IS_SEQ
	/// </summary>
	static bool NODE_IS_SEQ(FileNodeFlag flags)
	{
		return CV_NODE_IS_SEQ((int)flags);
	}

	/// <summary>
	/// CV_NODE_IS_MAP
	/// </summary>
	static bool NODE_IS_MAP(FileNodeFlag flags)
	{
		return CV_NODE_IS_MAP((int)flags);
	}

	/// <summary>
	/// CV_NODE_IS_COLLECTION
	/// </summary>
	static bool NODE_IS_COLLECTION(FileNodeFlag flags)
	{
		return CV_NODE_IS_COLLECTION((int)flags);
	}

	/// <summary>
	/// CV_NODE_IS_FLOW
	/// </summary>
	static bool NODE_IS_FLOW(FileNodeFlag flags)
	{
		return CV_NODE_IS_FLOW((int)flags);
	}

	/// <summary>
	/// CV_NODE_IS_EMPTY
	/// </summary>
	static bool NODE_IS_EMPTY(FileNodeFlag flags)
	{
		return CV_NODE_IS_EMPTY((int)flags);
	}

	/// <summary>
	/// CV_NODE_IS_USER
	/// </summary>
	static bool NODE_IS_USER(FileNodeFlag flags)
	{
		return CV_NODE_IS_USER((int)flags);
	}

	/// <summary>
	/// CV_NODE_HAS_NAME
	/// </summary>
	static bool NODE_HAS_NAME(FileNodeFlag flags)
	{
		return CV_NODE_HAS_NAME((int)flags);
	}

	/// <summary>
	/// CV_NODE_SEQ_IS_SIMPLE
	/// </summary>
	static bool NODE_SEQ_IS_SIMPLE(ManagedSeq^ seq)
	{
		CvSeq* ptr = seq->ToCvSeqPointer();
		return CV_NODE_SEQ_IS_SIMPLE(ptr);
	}
//////////////////////////////////////////////////////////////////////////